
#include "stdafx.h"
#include "WicPalette.h"

CWicPalette::CWicPalette()
{
    m_pIWICPalette = NULL;
}

CWicPalette::~CWicPalette()
{
    if(m_pIWICPalette)
    {
        m_pIWICPalette->Release();
    }
    m_pIWICPalette = NULL;
}

CWicPalette::CWicPalette(CWicPalette const & objPalette)
{
    m_pIWICPalette = objPalette.m_pIWICPalette;
    m_pIWICPalette->AddRef();
}

CWicPalette& CWicPalette::operator=(CWicPalette const & objPalette)
{
    if(m_pIWICPalette)
    {
        m_pIWICPalette->Release();
    }
    m_pIWICPalette = objPalette.m_pIWICPalette;
    m_pIWICPalette->AddRef();
    return *this;
}
